package friot.service.cloud.config.rabbitmq;

import org.springframework.amqp.support.converter.Jackson2JsonMessageConverter;
import org.springframework.amqp.support.converter.MessageConverter;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author He Kuntao
 * @desc RabbitMQ配置类
 * @date 2024/3/23 20:34
 */
@Configuration
public class RabbitMqConfig {

    /**
     * 配置RabbitMQ消息转换器
     *
     * @return JSONMessageConverter
     */
    @Bean
    public MessageConverter jackson2JsonMessageConverter() {
        return new Jackson2JsonMessageConverter();
    }
}
